//
//  ExclusiveTableViewCell.m
//  UI_homework_22_QQ音乐界面和阿里星球界面
//
//  Created by li cheng on 16/8/13.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "ExclusiveTableViewCell.h"

@interface ExclusiveTableViewCell()
@property (nonatomic, strong) UIImageView *myImageView;
@property (nonatomic, strong) UILabel *titleLable;
@property (nonatomic, strong) UILabel *contentLable;
@end
@implementation ExclusiveTableViewCell
#pragma mark - 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _myImageView = [[UIImageView alloc] init];
        _myImageView.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_myImageView];
        _titleLable = [[UILabel alloc] init];
        _titleLable.textAlignment = 1;
        _titleLable.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_titleLable];
        _contentLable = [[UILabel alloc] init];
        _contentLable.backgroundColor = [UIColor redColor];
        _contentLable.numberOfLines = 0;
        [self.contentView addSubview:_contentLable];
    }
    return self;
}
#pragma mark - 布局
- (void)layoutSubviews{
    [super layoutSubviews];
    CGFloat width = self.contentView.bounds.size.width / 3;
    CGFloat height = self.contentView.bounds.size.height;
    _myImageView.frame = CGRectMake(0, 0, width, height);
    _titleLable.frame = CGRectMake(width + 5, 5, width, height / 3);
    _contentLable.frame = CGRectMake(width + 5, height / 3 + 5, width, height / 2);
    
}
#pragma mark - 其他
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
